<div id="app">
    <el-card class="box-card">
        <div >
            <div>
                <div style="width: 500px;margin: 20px 0;" >
                    <el-input v-model="order_code_form" :autofocus="true" placeholder="请扫描 / 手动输入订单编号" @keyup.enter.native="keydown"></el-input>
                </div>
            </div>

            <div style="display: flex;justify-content: space-between;margin-top: 30px;">
                <div>
                    <div v-if="add_form.remark" style="margin-bottom: 20px;">备注：{{add_form.remark}}</div>
                    <el-table :data="add_form.goodso_item" border style="width: 800px;">
                        <el-table-column label="订单商品" width="280" prop="good_name" ></el-table-column>
                        <el-table-column label="订单数量" prop="order_num"></el-table-column>
                        <el-table-column label="出库数量" prop="num">
                            <template slot-scope="{row}">
                                <el-input type="number" min="1" @blur="blurnum(row)" v-model="row.num"></el-input>
                            </template>
                        </el-table-column>
                    </el-table>
                </div>
            </div>
            <div style="height: 20px;"></div>
            <div style="display: flex; align-items: center;margin: 30px 0;">
                <div>
                    <el-button type="primary" @click="reload">重置</el-button>
                    <el-button type="primary" @click="success_">完成出库</el-button>
                </div>
            </div>
        </div>
    </el-card>
    <el-dialog
            :visible.sync="dialogVisible"
            width="70%"
            :before-close="handleClose"
    >
        <div v-if="active_int===1">

        </div>
        <div v-if="active_int===2">
            <div>
                <div style="display: flex; align-items: center;">
                    <span style="margin-right: 60px;font-weight: bold;">出库商品</span>
                    <div>
                        <el-button type="primary" @click="edit_save">保存</el-button>
                        <el-button type="primary" @click="exit">退出</el-button>
                    </div>
                </div>
                <div style="width: 500px;margin: 20px auto;" class="inp_box">
                    <el-input v-model="order_code_form" placeholder="请扫描 / 手动输入商品条码" @keyup.enter.native="keydown_deit"></el-input>
                </div>

            </div>
            <el-table :data="edit_detail.goodsw_item"
                      border>
<!--                <el-table-column label="序号" prop="gid" width="110"></el-table-column>-->
                <el-table-column label="商品" prop="good_name" width="200"></el-table-column>
                <el-table-column label="商品分类" prop="good_type_name" width="110"></el-table-column>
                <el-table-column label="出库数量" prop="num" width="110">
                    <template slot-scope="{row}">
                        <el-input type="number" min="1" v-model="row.num" ></el-input>
                        <!--                        <el-button type="text" @click="del_good(row.gid)">删除</el-button>-->
                    </template>
                </el-table-column>
                <el-table-column label="操作"  >
                    <template slot-scope="{row}">
                        <el-button type="text" @click="del_good_edit(row.gid)">删除</el-button>
                    </template>
                </el-table-column>
            </el-table>

        </div>

    </el-dialog>
    <el-dialog
            title="变更提示"
            :visible.sync="dialogVisible_change"
            width="30%"
    >
        <el-select v-model="change_info_val">
            <el-option label="收货信息"
                       :value="1"></el-option>
            <el-option label="订单商品"
                       :value="2"></el-option>
        </el-select>
        <span slot="footer" class="dialog-footer">
    <el-button @click="dialogVisible_change = false">取 消</el-button>
    <el-button type="primary" @click="success">确 定</el-button>
  </span>
    </el-dialog>
</div>
<script !src="">
    new Vue({
        el: '#app',
        data: function() {
            return {
                form:{},
                dataArr:[],
                labelPosition:'left',
                bh:'',
                value1:'',
                value2:'',
                data:{
                    page:1,
                    limit:10,
                    outbound_no:'',
                    status_time:'',
                    end_time:''
                },
                total:0,
                currentPage:1,
                dialogVisible: false,
                active_int:1,
                detail_obj:{},
                dialogVisible_change:false,
                change_info_val:1,
                change_info_id:'',
                pickerOptions:'',
                edit_detail:{},
                add_form:{
                    oid:'',
                    tracking_numbercr:'',
                    order_no:'',
                    outbound_no:'',
                    outbound_name:'',
                    outbound_uid:'',
                    outbound_username:'',
                    consignee:'',
                    outbound_type:1,
                    good_outbound_time:'',
                    goodso_item:[],
                },
                order_code_form:'',
                goodsw_item:[],
                isFirst:true,
                oid:'',
                w_Outbound_num:0,
                y_Outbound_num:0,
                order_item:[]
            }
        },
        created(){
            this.get_list()
        },
        methods:{
            blurnum(row){
                if(row.num>row.order_num){
                    this.$message({
                        type: 'info',
                        message: '数量已超出'
                    });
                    return false;
                }
                const loading = this.$loading({
                    lock: true,
                    text: 'Loading',
                    spinner: 'el-icon-loading',
                    background: 'rgba(0, 0, 0, 0.7)'
                });
                $.ajax({
                    url:"/admin/gou.good_outbound/ga_goodnum",
                    type:'POST',
                    data:{oid:this.add_form.oid,gid:row.gid,num:row.num},
                    dataType: 'json',
                    success:(res)=>{
                        loading.close();
                        if(res.code==1){

                        }else{
                            this.$message({
                                type: 'info',
                                message: res.msg
                            });
                        }
                    },
                    error:()=>{
                        loading.close();
                        this.$message({
                            type: 'info',
                            message: '网络状态差'
                        });
                    }
                })
            },
            del_goodso_item(row){
                this.$confirm('确认删除'+row.good_name+'？')
                    .then(_ => {
                        const loading = this.$loading({
                            lock: true,
                            text: 'Loading',
                            spinner: 'el-icon-loading',
                            background: 'rgba(0, 0, 0, 0.7)'
                        });
                        $.ajax({
                            url:"/admin/gou.good_outbound/outbound_gooddel",
                            type:'POST',
                            data:{oid:this.add_form.oid,gid:row.gid},
                            dataType: 'json',
                            success:(res)=>{
                                loading.close();
                                if(res.code==1){
                                    this.$message({
                                        type: 'success',
                                        message: res.msg
                                    });
                                    var index = this.add_form.goodso_item.findIndex(d=>d.gid==row.gid)
                                    if(index!==-1){
                                        this.add_form.goodso_item.splice(index,1)
                                    }
                                    this.w_Outbound_num = res.data.w_Outbound_num
                                    this.y_Outbound_num = res.data.y_Outbound_num
                                }else{
                                    this.$message({
                                        type: 'info',
                                        message: res.msg
                                    });
                                }
                            },
                            error:()=>{
                                loading.close();
                                this.$message({
                                    type: 'info',
                                    message: '网络状态差'
                                });
                            }
                        })
                    })
                    .catch(_ => {});

            },
            reload(){
                const loading = this.$loading({
                    lock: true,
                    text: 'Loading',
                    spinner: 'el-icon-loading',
                    background: 'rgba(0, 0, 0, 0.7)'
                });
                $.ajax({
                    url:"/admin/ord.order/order_resetting",
                    type:'POST',
                    data:{oid:this.add_form.oid},
                    dataType: 'json',
                    success:(res)=>{
                        loading.close();
                        if(res.code==1){
                            this.order_code_form = ''
                            this.isFirst = true
                            this.add_form.oid = ''
                            this.add_form.consignee =''
                            this.add_form.order_no = ''
                            this.add_form.remark = ''
                            this.order_item = []
                            this.add_form.goodso_item = []
                            this.add_form.tracking_numbercr=''
                            this.$message({
                                type: 'success',
                                message: res.msg
                            });

                        }else{
                            this.$message({
                                type: 'info',
                                message: res.msg
                            });
                        }
                    },
                    error:()=>{
                        loading.close();
                        this.$message({
                            type: 'info',
                            message: '网络状态差'
                        });
                    }
                })

            },
            handleClose(done) {
                if(this.active_int==3){
                    this.$confirm('确认关闭？')
                        .then(_ => {
                            if(this.active_int==3){
                                this.order_code_form = ''
                                this.isFirst = true
                                this.add_form.oid = ''
                                this.add_form.consignee =''
                                this.add_form.order_no = ''
                                this.order_item = []
                                this.add_form.goodso_item = []
                                this.w_Outbound_num = 0
                                this.y_Outbound_num = 0

                            }
                            done();
                        })
                        .catch(_ => {});
                }else {
                    done();
                }

            },
            get_list_time(){
                var timdedetail = this.value1[0]
                this.data.status_time = this.getData(timdedetail)

                var end_time = this.value1[1]
                this.data.end_time = this.getData(end_time)
                this.get_list()
            },
            getData(timdedetail){
                var year=timdedetail.getFullYear();
                var month=(timdedetail.getMonth()+1)>=10?timdedetail.getMonth()+1:'0'+(timdedetail.getMonth()+1);
                var date=timdedetail.getDate()>=10?timdedetail.getDate():'0'+timdedetail.getDate();
                var hours=timdedetail.getHours()>=10?timdedetail.getHours():'0'+timdedetail.getHours();
                var minutes=timdedetail.getMinutes()>=10?timdedetail.getMinutes():'0'+timdedetail.getMinutes();
                var seconds=timdedetail.getSeconds()>=10?timdedetail.getSeconds():'0'+timdedetail.getSeconds();;
                var time=year+"-"+month+"-"+date+" "+hours+":"+minutes+":"+seconds;
                return time
            },
            del_good(id){
                this.$confirm('确认删除？', '提示', {
                    confirmButtonText: '确定',
                    cancelButtonText: '取消',
                    type: 'warning'
                }).then(() => {
                    var index = this.add_form.goodsw_item.findIndex(d=>d.gid==id)
                    this.add_form.goodsw_item.splice(index,1)
                })
            },
            del_good_edit(id){
                this.$confirm('确认删除？', '提示', {
                    confirmButtonText: '确定',
                    cancelButtonText: '取消',
                    type: 'warning'
                }).then(() => {
                    var index = this.edit_detail.goodsw_item.findIndex(d=>d.gid==id)
                    this.edit_detail.goodsw_item.splice(index,1)
                })
            },
            edit_save(){
                const loading = this.$loading({
                    lock: true,
                    text: 'Loading',
                    spinner: 'el-icon-loading',
                    background: 'rgba(0, 0, 0, 0.7)'
                });
                $.ajax({
                    url:"/admin/gwa.goods_warehousing/edit",
                    type:'POST',
                    data:this.edit_detail,
                    dataType: 'json',
                    success:(res)=>{
                        if(res.code==1){
                            loading.close();
                            this.$message({
                                type: 'success',
                                message: res.msg
                            });
                            this.dialogVisible = false
                            this.get_list()
                        }else{
                            this.$message({
                                type: 'info',
                                message: res.msg
                            });
                        }
                    },
                    error:()=>{
                        loading.close();
                        this.$message({
                            type: 'info',
                            message: '网络状态差'
                        });
                    }
                })
            },
            keydown(e){
                if(e.keyCode === 13){
                    // var i = this.add_form.goodsw_item[this.add_form.goodsw_item.length-1].gid-1+2

                    if(this.isFirst){
                        // var reg_num = /^[0-9]*$/
                        // var code = parseInt(this.order_code_form)
                        // if(reg_num.test(code)){
                        //
                        // }else{
                        //         this.$message({
                        //             type: 'info',
                        //             message: '条码错误，请扫描快递单号'
                        //         });
                        // }

                        data = {order_bar_code:this.order_code_form,type:1}
                        const loading = this.$loading({
                            lock: true,
                            text: 'Loading',
                            spinner: 'el-icon-loading',
                            background: 'rgba(0, 0, 0, 0.7)'
                        });

                        $.ajax({
                            url:"/admin/gou.good_outbound/get_outmgood",
                            type:'POST',
                            data:data,
                            dataType: 'json',
                            success:(res)=>{
                                loading.close();
                                if(res.code==1){
                                    this.isFirst = false
                                    this.add_form.tracking_numbercr = this.order_code_form
                                    this.order_code_form = ''
                                    this.add_form.oid = res.data.id
                                    this.add_form.remark = res.data.remark
                                    this.add_form.consignee = res.data.consignee
                                    this.add_form.order_no = res.data.order_no
                                    this.order_item = res.data.order_item
                                    this.w_Outbound_num = res.data.w_Outbound_num
                                    this.y_Outbound_num = res.data.y_Outbound_num
                                    this.add_form.goodso_item = res.data.good_outbound_view
                                }else{
                                    this.$message({
                                        type: 'info',
                                        message: res.msg
                                    });
                                    this.order_code_form = ''
                                }
                            },
                            error:()=>{
                                loading.close();
                                this.$message({
                                    type: 'info',
                                    message: '网络状态差'
                                });
                            }
                        })

                    }else{
                        // 202305059851102529
                        var reg = /[^\x00-\xff]/g
                        if(reg.test(this.order_code_form)){
                            data = {keyword:this.order_code_form,type:2,oid:this.add_form.oid}
                        }else if(!reg.test(this.order_code_form)){
                            data = {keyword:this.order_code_form,type:2,oid:this.add_form.oid}
                        }

                        console.log(this.add_form.goodso_item);

                        const loading = this.$loading({
                            lock: true,
                            text: 'Loading',
                            spinner: 'el-icon-loading',
                            background: 'rgba(0, 0, 0, 0.7)'
                        });
                        $.ajax({
                            url:"/admin/gou.good_outbound/get_outmgood",
                            type:'POST',
                            data:data,
                            dataType: 'json',
                            success:(res)=>{
                                loading.close();
                                if(!reg.test(this.order_code_form)){
                                    this.order_code_form = ''
                                }
                                if(res.code==1){

                                    this.add_form.goodso_item = res.data.good_outbound_view
                                    var is_copy = true
                                    for(var i = 0;i<this.add_form.goodso_item.length;i++){
                                        var item = this.add_form.goodso_item[i]
                                        if(item.num != item.order_num){
                                            is_copy = false
                                            break ;
                                        }
                                    }
                                    if(is_copy){
                                        this.success_()
                                    }

                                }else{
                                    this.$message({
                                        type: 'info',
                                        message: res.msg
                                    });
                                }
                            },
                            error:()=>{
                                loading.close();
                                this.$message({
                                    type: 'info',
                                    message: '网络状态差'
                                });
                            }
                        })
                    }
                }
            },
            keydown_deit(e){
                if(e.keyCode === 13){
                    var reg = /[^\x00-\xff]/g
                    var data = {}
                    if(reg.test(this.order_code_form)){
                        data = {good_name:this.order_code_form}
                    }else{
                        data = {bar_code:this.order_code_form}
                    }

                    const loading = this.$loading({
                        lock: true,
                        text: 'Loading',
                        spinner: 'el-icon-loading',
                        background: 'rgba(0, 0, 0, 0.7)'
                    });

                    $.ajax({
                        url:"/admin/gwa.goods_warehousing/get_tmgood",
                        type:'POST',
                        data:data,
                        dataType: 'json',
                        success:(res)=>{
                            loading.close();
                            if(res.code==1){
                                this.order_code_form = ''
                                var data_obj = {
                                    "gid":res.data.id,
                                    "good_name":res.data.title,
                                    "good_type_id":res.data.good_type_id,
                                    "good_type_name":res.data.good_type_name,
                                    "num":"1",
                                    "good_bar_code":res.data.bar_code,
                                }
                                if(this.edit_detail.goodsw_item.findIndex(d=>d.good_bar_code==res.data.bar_code) ==-1){
                                    this.edit_detail.goodsw_item.push(data_obj)
                                }
                            }else{
                                this.$message({
                                    type: 'info',
                                    message: res.msg
                                });
                            }
                        },
                        error:()=>{
                            loading.close();
                            this.$message({
                                type: 'info',
                                message: '网络状态差'
                            });
                        }
                    })
                }
            },
            onSave(){
                this.add_form.status = 1

                const loading = this.$loading({
                    lock: true,
                    text: 'Loading',
                    spinner: 'el-icon-loading',
                    background: 'rgba(0, 0, 0, 0.7)'
                });

                $.ajax({
                    url:"/admin/gwa.goods_warehousing/add",
                    type:'POST',
                    data:this.add_form,
                    dataType: 'json',
                    success:(res)=>{
                        loading.close();
                        if(res.code==1){
                            this.$message({
                                type: 'success',
                                message: res.msg
                            });
                            this.dialogVisible = false
                            this.add_form={
                                receipt_name:'',
                                status:0,
                                receipt_no:'',
                                receipt_username:'',
                                receipt_id:'',
                                warehousing_time:'',
                                goodsw_item:[]
                            }
                            this.get_list()

                        }else{
                            this.$message({
                                type: 'info',
                                message: res.msg
                            });
                        }
                    },
                    error:()=>{
                        loading.close();
                        this.$message({
                            type: 'info',
                            message: '网络状态差'
                        });
                    }
                })
            },
            exit(){
                this.dialogVisible = false;
            },
            success_(){
                if(this.add_form.goodso_item.length>0){
                    const loading = this.$loading({
                        lock: true,
                        text: 'Loading',
                        spinner: 'el-icon-loading',
                        background: 'rgba(0, 0, 0, 0.7)'
                    });
                    $.ajax({
                        url:'/admin/gou.GoodOutbound/goodout_data',
                        dataType:"json",
                        success:(res)=>{
                            loading.close()
                            this.add_form.outbound_no  = res.data.outbound_no
                            this.add_form.outbound_username  = res.data.outbound_username
                            this.add_form.outbound_uid  = res.data.outbound_uid
                            this.add_form.good_outbound_time  = res.data.outbound_time

                            $.ajax({
                                url:"/admin/gou.good_outbound/add",
                                type:'POST',
                                data:{
                                    oid:this.add_form.oid,
                                    tracking_numbercr:this.add_form.tracking_numbercr,
                                    order_no:this.add_form.order_no,
                                    outbound_no:this.add_form.outbound_no,
                                    outbound_name:this.add_form.outbound_name,
                                    outbound_uid:this.add_form.outbound_uid,
                                    outbound_username:this.add_form.outbound_username,
                                    consignee:this.add_form.consignee,
                                    outbound_type:this.add_form.outbound_type,
                                    good_outbound_time:this.add_form.good_outbound_time,
                                    goodso_item:this.add_form.goodso_item
                                },
                                dataType: 'json',
                                success:(res)=>{
                                    loading.close();
                                    if(res.code==1){
                                        this.$message({
                                            type: 'success',
                                            message: res.msg
                                        });
                                        this.add_form={
                                            oid:'',
                                            tracking_numbercr:'',
                                            order_no:'',
                                            remark:'',
                                            outbound_no:'',
                                            outbound_name:'',
                                            outbound_uid:'',
                                            outbound_username:'',
                                            consignee:'',
                                            good_outbound_time:'',
                                            goodso_item:[],
                                        }
                                        this.order_code_form = ''
                                        this.isFirst = true
                                        this.add_form.oid = ''
                                        this.add_form.consignee =''
                                        this.add_form.remark =''
                                        this.add_form.order_no = ''
                                        this.order_item = []
                                        this.add_form.goodso_item = []
                                    }else{
                                        console.log(this.add_form,'this.add_form')
                                        this.$message({
                                            type: 'info',
                                            message: res.msg
                                        });
                                    }
                                },
                                error:()=>{
                                    loading.close();
                                    this.$message({
                                        type: 'err',
                                        message: '网络状态差'
                                    });
                                }
                            })
                        },
                        error:()=>{
                            loading.close();
                            this.$message({
                                type: 'err',
                                message: '网络状态差'
                            });
                        }
                    })

                }else{
                    this.$message({
                        type: 'info',
                        message: '请输入出库商品'
                    });
                }

            },
            success(){
                const loading = this.$loading({
                    lock: true,
                    text: 'Loading',
                    spinner: 'el-icon-loading',
                    background: 'rgba(0, 0, 0, 0.7)',
                    directional:'8000'
                });
                $.ajax({
                    url:"/admin/ord.order/change_information",
                    data:{change_info:this.change_info_val,id:this.change_info_id},
                    type:'POST',
                    dataType: 'json',
                    success:(res)=>{
                        loading.close()
                        if(res.code==1){
                            var item = this.dataArr.find(d=>d.id==this.change_info_id)
                            item.change_info = this.change_info_val
                            this.$message({
                                type: 'success',
                                message: res.msg
                            });
                        }else{
                            this.$message({
                                type: 'info',
                                message: res.msg
                            });
                        }
                    },
                    error:()=>{
                        loading.close();
                        this.$message({
                            type: 'err',
                            message: '网络状态差'
                        });
                    }
                })
                this.dialogVisible_change = false
            },
            change_info(id){
                this.dialogVisible_change = true
                this.change_info_id = id
            },
            cancel_order(id){
                this.$confirm('是否取消此订单？', '提示', {
                    confirmButtonText: '确定',
                    cancelButtonText: '取消',
                    type: 'warning'
                }).then(() => {
                    $.ajax({
                        url:"/admin/ord.order/cancel_order",
                        data:{id},
                        type:'POST',
                        dataType: 'json',
                        success:(res)=>{
                            if(res.code==1){
                                var item = this.dataArr.find(d=>d.id==id)
                                item.status = 7
                                this.$message({
                                    type: 'success',
                                    message: res.msg
                                });
                            }else{
                                this.$message({
                                    type: 'info',
                                    message: res.msg
                                });
                            }
                        }
                    })
                }).catch(() => {

                });
            },
            examine(id){
                this.$confirm('修改变更审核状态', '审核', {
                    distinguishCancelAndClose: true,
                    center:true,
                    confirmButtonText: '通过',
                    cancelButtonText: '驳回',
                    type: 'warning',
                    beforeClose:(action, instance, done)=>{
                        if(action=='confirm'){
                            $.ajax({
                                url:"/admin/chao.change_order/change_order_review",
                                data:{id},
                                type:'POST',
                                dataType: 'json',
                                success:(res)=>{
                                    if(res.code==1){
                                        var item = this.dataArr.find(d=>d.id==id)
                                        item.change_status = 2
                                        this.$message({
                                            type: 'success',
                                            message: res.msg
                                        });
                                    }else{
                                        this.$message({
                                            type: 'info',
                                            message: res.msg
                                        });
                                    }
                                    done()
                                }
                            })
                        }else if(action=='cancel'){
                            $.ajax({
                                url:"/admin/chao.change_order/change_order_refuse",
                                data:{id,change_reason:'驳回'},
                                type:'POST',
                                dataType: 'json',
                                success:(res)=>{
                                    if(res.code==1){
                                        var item = this.dataArr.find(d=>d.id==id)
                                        item.change_status = 3
                                        this.$message({
                                            type: 'success',
                                            message: res.msg
                                        });
                                    }else{
                                        this.$message({
                                            type: 'info',
                                            message: res.msg
                                        });
                                    }
                                }
                            })
                            done()
                        }else{
                            done()
                        }
                    }
                })
            },
            onSubmit(){
                $.ajax({
                    url:'/admin/gou.GoodOutbound/goodout_data',
                    dataType:"json",
                    success:(res)=>{
                        this.add_form.outbound_no  = res.data.outbound_no
                        this.add_form.outbound_username  = res.data.outbound_username
                        this.add_form.outbound_uid  = res.data.outbound_uid
                        this.add_form.good_outbound_time  = res.data.outbound_time
                        this.dialogVisible = true;
                        this.active_int=3;
                    }
                })
            },
            detail_show(data){
                $.ajax({
                    url:"/admin/gou.good_outbound/goodo_detail",
                    data:{id:data.id},
                    type:'GET',
                    dataType: 'json',
                    success:(res)=>{
                        if(res.code==1){
                            this.dialogVisible = true;
                            this.active_int=1;
                            this.detail_obj = res.data
                        }else{
                            this.$message({
                                type: 'info',
                                message: res.msg
                            });
                        }
                    }
                })
            },
            edit_show(data){
                $.ajax({
                    url:"/admin/gwa.goods_warehousing/goodw_detail",
                    data:{id:data.id},
                    type:'GET',
                    dataType: 'json',
                    success:(res)=>{
                        if(res.code==1){
                            res.row.goodsw_item = res.row.goods_warehousing_item
                            delete res.row.goods_warehousing_item
                            this.edit_detail = res.row

                            this.dialogVisible = true;
                            this.active_int=2;
                        }else{
                            this.$message({
                                type: 'info',
                                message: res.msg
                            });
                        }
                    }
                })

            },
            notes_show(data){
                this.$prompt('请输备注', '提示', {
                    confirmButtonText: '确定',
                    cancelButtonText: '取消',
                    inputPattern: /\S+/,
                    inputErrorMessage: '备注不能为空'
                }).then(({ value }) => {
                    $.ajax({
                        url:'/admin/gou.good_outbound/edit_outboundremark',
                        data:{id:data.id,remarks:value},
                        dataType:"json",
                        success:(res)=>{
                            if(res.code==1){
                                this.$message({
                                    type: 'success',
                                    message:res.msg
                                });
                                var item = this.dataArr.find(d=>d.id==data.id)
                                item.remarks = value
                            }else{
                                this.$message({
                                    type: 'info',
                                    message: res.msg
                                });
                            }
                        }
                    })

                }).catch(() => {
                    this.$message({
                        type: 'info',
                        message: '取消输入'
                    });
                });
            },
            createOrder(){
                window.location.href = '/admin/ord.order/add'
            },
            // change(){
            //     this.data.change_status = this.labelPosition
            //     this.data.page = 1
            //     this.data.limit = 10
            //     this.dataArr = []
            //     this.get_list()
            //
            // },
            handleSizeChange(val){
                this.data.limit = val
                this.get_list()
            },
            handleCurrentChange(val) {
                this.data.page = val
                this.get_list()
            },
            get_list(){
                $.ajax({
                    url:'/admin/gou.good_outbound/index',
                    data:this.data,
                    dataType:"json",
                    success:(res)=>{
                        this.dataArr = res.data
                        this.total = res.count
                    }
                })
            }
        },
        mounted() {

        }
    })
</script>
<style>
    .inp_box .el-input input{
        height: 100px !important;
    }
</style>